package org.jeecg.modules.cascv.image.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.cascv.image.entity.GdqvRack;
import org.jeecg.modules.cascv.image.mapper.GdqvRackMapper;
import org.jeecg.modules.cascv.image.service.IGdqvRackService;
import org.jeecg.modules.cascv.image.util.TreeUtil;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 载荷子系统配置表
 * @Author: jeecg-boot
 * @Date:   2022-08-30
 * @Version: V1.0
 */
@Service
public class GdqvRackServiceImpl extends ServiceImpl<GdqvRackMapper, GdqvRack> implements IGdqvRackService {

    @Override
    public List<GdqvRack> pageTree(QueryWrapper<GdqvRack> queryWrapper) {
        List<GdqvRack> rackList = baseMapper.selectPageTree(queryWrapper);
        return TreeUtil.wrapperTree(rackList, GdqvRack::getId, GdqvRack::getPid, GdqvRack::setChildNode, Long.parseLong("0"));
    }

}
